From a131e477601a89d8ca920ff9eb49131919536976 Mon Sep 17 00:00:00 2001
From: Hal Emmerich <hal@halemmerich.com>
Date: Sun, 8 Dec 2019 21:57:21 -0600
Subject: [PATCH] Blank the screen before showing the disabled USB boot
 warning, and wait for user to press a key to return to the developer mode
 screen

---
 firmware/lib/vboot_ui.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c
index c84452b7..cc8abba2 100644
--- a/firmware/lib/vboot_ui.c
+++ b/firmware/lib/vboot_ui.c
@@ -231,6 +231,7 @@ VbError_t vb2_developer_ui(struct vb2_context *ctx)
 		}
 	}
 
+developer_mode_screen:
 	/* Show the dev mode warning screen */
 	VbDisplayScreen(ctx, VB_SCREEN_DEVELOPER_WARNING, 0);
 
@@ -339,14 +340,23 @@ VbError_t vb2_developer_ui(struct vb2_context *ctx)
 			if (!allow_usb) {
 				VB2_DEBUG("VbBootDeveloper() - "
 					  "USB booting is disabled\n");
+
+				VbDisplayScreen(ctx, VB_SCREEN_BLANK, 1);
+
+
 				VbExDisplayDebugInfo(
 					"WARNING: Booting from external media "
 					"(USB/SD) has not been enabled. Refer "
 					"to the developer-mode documentation "
-					"for details.\n");
+					"for details.\n\n"
+					"Press any key to continue.\n\n");
 				VbExBeep(120, 400);
 				VbExSleepMs(120);
 				VbExBeep(120, 400);
+
+				while (!VbExKeyboardRead()) ;
+
+				goto developer_mode_screen;
 			} else {
 				/*
 				 * Clear the screen to show we get the Ctrl+U
-- 
2.20.1

